package com.sinaapp.kjWeb.daoimpl;

import java.util.List;

import com.sinaapp.kjWeb.dao.BaseDao;
import com.sinaapp.kjWeb.dao.SuperDao;

/*
 *auth:徐疆
 *date 2014-1-23 下午8:22:47
 */
public class BaseDaoImpl<T> extends SuperDao implements BaseDao<T> {
	private String nameSpace;
	@Override
	public int insert(T t) {
		return this.template.insert(nameSpace+".insert", t);
	}

	@Override
	public int update(T t) {
		return this.template.update(nameSpace+".update", t);
	}

	@Override
	public int deletByPrimaryKey(String key) {
		return this.template.delete(nameSpace+".deletByPrimaryKey", key);
	}

	@Override
	public List<T> findByExample(T t) {
		return this.template.selectList(nameSpace+".findByExample", t);
	}

	@Override
	public T findOnlyByExample(T t) {
		return null;
	}

	@Override
	public T findByPrimaryKey(String key) {
		return null;
	}
	
	public String getNameSpace() {
		return nameSpace;
	}
	public void setNameSpace(String nameSpace) {
		this.nameSpace = nameSpace;
	}

}

